import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: resolve => require(['../view/home.vue'], resolve)
    },
    {
      path: '/company',
      name: 'company',
      component: resolve => require(['../view/conpany.vue'], resolve)
    },
    {
      path: '/news',
      name: 'news',
      component: resolve => require(['../view/news.vue'], resolve)
    },
    {
      path: '/sweets',
      name: 'sweets',
      component: resolve => require(['../view/sweets.vue'], resolve)
    },
    {
      path: '/users',
      name: 'users',
      component: resolve => require(['../view/users.vue'], resolve)
    },
    {
      path: '/contact',
      name: 'contact',
      component: resolve => require(['../view/contact.vue'], resolve)
    },
    {
      path: '/detail/:productId',
      name: 'detail',
      component: resolve => require(['../view/detail.vue'], resolve)
    },
    {
      path: '/cart',
      name: 'cart',
      component: resolve => require(['../view/cart.vue'], resolve)
    },
    {
      path: '/management',
      name: 'management',
      component: resolve => require(['../view/management.vue'], resolve)
    },
    {
      path: '/service',
      name: 'service',
      component: resolve => require(['../view/service.vue'], resolve)
    }
  ]
})
